
/*
* 可通过 $page.computed.xxx 访问这里定义的计算状态
* 注意：页面级别的计算状态仅在所属的页面有效
*/

export default {
  name() { return 'WeApps' },
  cardNo(){
    if($page.state.showCard){
      return $page.state.currentCardType.cardNo;
    }else{
      let text = $page.state.currentCardType.cardNo.slice(1,$page.state.currentCardType.cardNo.length-1);
      let start = $page.state.currentCardType.cardNo.slice(0,1);
      let end = $page.state.currentCardType.cardNo.slice(-1);
      let str = '';
      for(var i = 0; i < text.length; i++){
        str += '*';
      }
      return `${start}${str}${end}`
    }
  }
}